package site.entity;

import java.util.Date;

import site.helper.CourseTitle;
import site.helper.ResourceType;

import neoutil.CommonEntity;

/**
 * 
 * Description:
 * 
 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
 *          University, China
 * @version 1.0 2012-4-8 下午6:50:37
 */
public class Resource extends CommonEntity {
	/**
	 * 资源类型
	 */
	private String type = ResourceType.LIVE;
	/**
	 * 统一编号
	 */
	private String normcode;
	/**
	 * 标题
	 */
	private String title;

	public static final String TEXT = "TEXT";
	public static final String PPT = "PPT";
	public static final String PHOTO = "PHOTO";
	public static final String AUDIO = "AUDIO";
	public static final String VIDEO = "VIDEO";
	public static final String FLASH = "FLASH";
	public static final String OTHER = "OTHER";
	/**
	 * 文件格式
	 */
	private String format;
	/**
	 * 所属课程
	 */
	private String course;
	/**
	 * 所属章节编号
	 */
	private String chapter;
	/**
	 * 关联章节编号
	 */
	private String chapters;
	/**
	 * 作者，提供者为个人时，此内容为用户注册邮箱；提供者为团队时，此内容为团队编号。
	 */
	private String author;
	/**
	 * 作者真实姓名
	 */
	private String authorRealName;
	/**
	 * 合作者，用“，”隔开
	 */
	private String partners;
	/**
	 * 提供者编号
	 */
	private String teamCode;
	/**
	 * 提供者名称
	 */
	private String provider;
	/**
	 * 关键字，用“，”隔开
	 */
	private String keywords;
	/**
	 * 简介文字
	 */
	private String note;
	/**
	 * 附件名称
	 */
	private String fileName;
	/**
	 * 发布时间
	 */
	private Date publicTime = new Date();
	/**
	 * 创建时间
	 */
	private Date createTime = new Date();
	/**
	 * 相关资源编号，用“，”隔开
	 */
	private String relate;

	public static final String UPDATE_INSERT = "insert";
	public static final String UPDATE_UPDATE = "update";
	public static final String UPDATE_DELETE = "delete";
	/**
	 * 更新方式
	 */
	private String updateType;

	// 创建人
	private long authorId;
	// 访问数或下载数
	private int visitNum;

	private int cid;
	
	/**
	 * 录入
	 */
	public static final int STATUS_INPUT = 0;
	/**
	 * 二审
	 */
	public static final int STATUS_TWOPASS = 1;
	/**
	 * 三审
	 */
	public static final int STATUS_THREEPASS = 2;
	/**
	 * 拒绝
	 */
	public static final int STATUS_REFUSE = 3;
	/**
	 * 未通过
	 */
	public static final int STATUS_UNPASS = -1;
	/**
	 * 状态
	 */
	private int status;
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getNormcode() {
		return normcode;
	}

	public void setNormcode(String normcode) {
		this.normcode = normcode;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getFormat() {
		return format;
	}

	public void setFormat(String format) {
		this.format = format;
	}

	public String getCourse() {
		return course;
	}

	public void setCourse(String course) {
		this.course = course;
	}

	public String getChapter() {
		return chapter;
	}

	public void setChapter(String chapter) {
		this.chapter = chapter;
	}

	public String getChapters() {
		return chapters;
	}

	public void setChapters(String chapters) {
		this.chapters = chapters;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getAuthorRealName() {
		return authorRealName;
	}

	public void setAuthorRealName(String authorRealName) {
		this.authorRealName = authorRealName;
	}

	public String getPartners() {
		return partners;
	}

	public void setPartners(String partners) {
		this.partners = partners;
	}

	public String getTeamCode() {
		return teamCode;
	}

	public void setTeamCode(String teamCode) {
		this.teamCode = teamCode;
	}

	public String getProvider() {
		return provider;
	}

	public void setProvider(String provider) {
		this.provider = provider;
	}

	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public Date getPublicTime() {
		return publicTime;
	}

	public void setPublicTime(Date publicTime) {
		this.publicTime = publicTime;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getRelate() {
		return relate;
	}

	public void setRelate(String relate) {
		this.relate = relate;
	}

	public String getUpdateType() {
		return updateType;
	}

	public void setUpdateType(String updateType) {
		this.updateType = updateType;
	}

	public long getAuthorId() {
		return authorId;
	}

	public void setAuthorId(long authorId) {
		this.authorId = authorId;
	}

	public int getVisitNum() {
		return visitNum;
	}

	public void setVisitNum(int visitNum) {
		this.visitNum = visitNum;
	}
	
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}


	public int getCid() {
		return cid;
	}

	public void setCid(int cid) {
		this.cid = cid;
	}
}
